import {MyRequest} from "@/utils/request.js"

//手机号码注册
export function registerByPhone(data){
	return MyRequest({
		method:'POST',
		url:`/api/users/registerByPhone`,
		data
	})
}
//短信
export function send(phone){
	return MyRequest({
		method:'GET',
		url:`/api/sms/send`,
		params:{
			phone
		}
	})
}

//手机号码或邮箱登录
export function login(params){
	return MyRequest({
		method:'post',
		url:`/api/users/loginOrRegisterByPhone?phone=${params.phone}&verifyCode=${params.verifyCode}`,
	})
}

//	QQ登录
export function QQadd(data){
	return MyRequest({
		method:'post',
		// url:`/haot/qq/getQQ`,
		url:`/api/users/add`,
		data
	})
}

//用户统计
export function statistics(userId){
	return MyRequest({
		method:'GET',
		url:`/api/count/statistics?userId=${userId}`,
	})
}